#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    this->setWindowTitle("窗口标题");


    QPushButton* button=new QPushButton(this);
    button->move(200,200);
    button->setText("按钮");
    button->setWindowTitle("按钮标题");//不会显示，setWindowTitle是针对顶层窗口这样的QWidget才有效

    //connect(button,&QPushButton::clicked,this,&Widget::handleclick);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::handleclick()
{
    QRect rect1=this->geometry();
    QRect rect2=this->frameGeometry();

    qDebug()<<rect1;
    qDebug()<<rect2;

}
